<template>
  <!-- 
    Vue2 定义组件：必须有一个根标签
    Vue3 定义组件：不需要根标签
  -->
  <div>count: {{ count }}</div>
  <button @click="setCount">按钮</button>
</template>

<script lang="ts">
export default {
  name: "App",
  data() {
    return {
      count: 0,
    };
  },
  methods: {
    setCount() {
      this.count++;
    },
  },
};
</script>

<style></style>
